/** 
 * File-Name:Fund.java
 *
 * Created on 2011-6-2 上午11:16:39
 * 
 * @author: Neo (neolimeng@gmail.com)
 * Software Engineering Institute, Peking University, China
 * 
 * Copyright (c) 2009, Peking University
 * 
 *
 */
package xiaoyou.entity;

import java.util.Date;
import java.util.UUID;

import xiaoyou.neoutil.DateTimeUtils;

/**
 * Description:专项基金
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2011-6-2 上午11:16:39
 */
public class Fund {
	private long id;
	private String uuid = UUID.randomUUID().toString();

	/**
	 * 专项基金名称
	 */
	private String name;

	/**
	 * 捐赠方简介
	 */
	private String donatorIntro;

	/**
	 * 捐赠方名称
	 */
	private String donatorName;

	/**
	 * 捐赠额度
	 */
	private String donationNum;

	/**
	 * 捐赠金额详细说明文件链接地址
	 */
	private String donationNumFile;

	/**
	 * 设立时间
	 */
	private Date foundDate;

	/**
	 * 使用办法
	 */
	private String usageProcedures;

	/**
	 * 管理机构
	 */
	private String organization;

	/**
	 * 基金使用情况
	 */
	private String fundUsage;

	private long authorId;
	private User author;
	private Date publishDate;
	private Date updateDate;
	private int entityStatus = 1;
	private String reserve01;
	private String reserve02;
	private String reserve03;
	private String reserve04;
	private String reserve05;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getShortName24() {
		if (name != null & name.length() > 23) {
			return name.substring(0, 23) + "...";
		} else {
			return name;
		}
	}

	public String getDonatorIntro() {
		return donatorIntro;
	}

	public void setDonatorIntro(String donatorIntro) {
		this.donatorIntro = donatorIntro;
	}

	public Date getFoundDate() {
		return foundDate;
	}

	public void setFoundDate(Date foundDate) {
		this.foundDate = foundDate;
	}

	public void setFoundDate(String dateString) {
		try {
			this.foundDate = DateTimeUtils
					.getFormatedDateFromString(dateString);
		} catch (Exception e) {
			e.printStackTrace();
			this.foundDate = null;
		}
	}

	public String getUsageProcedures() {
		return usageProcedures;
	}

	public void setUsageProcedures(String usageProcedures) {
		this.usageProcedures = usageProcedures;
	}

	public String getOrganization() {
		return organization;
	}

	public void setOrganization(String organization) {
		this.organization = organization;
	}

	public long getAuthorId() {
		return authorId;
	}

	public void setAuthorId(long authorId) {
		this.authorId = authorId;
	}

	public User getAuthor() {
		return author;
	}

	public void setAuthor(User author) {
		this.author = author;
		this.authorId = author.getId();
	}

	public Date getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public int getEntityStatus() {
		return entityStatus;
	}

	public void setEntityStatus(int entityStatus) {
		this.entityStatus = entityStatus;
	}

	public String getReserve01() {
		return reserve01;
	}

	public void setReserve01(String reserve01) {
		this.reserve01 = reserve01;
	}

	public String getReserve02() {
		return reserve02;
	}

	public void setReserve02(String reserve02) {
		this.reserve02 = reserve02;
	}

	public String getReserve03() {
		return reserve03;
	}

	public void setReserve03(String reserve03) {
		this.reserve03 = reserve03;
	}

	public String getReserve04() {
		return reserve04;
	}

	public void setReserve04(String reserve04) {
		this.reserve04 = reserve04;
	}

	public String getReserve05() {
		return reserve05;
	}

	public void setReserve05(String reserve05) {
		this.reserve05 = reserve05;
	}

	public String getDonationNum() {
		return donationNum;
	}

	public void setDonationNum(String donationNum) {
		this.donationNum = donationNum;
	}

	public String getDonatorName() {
		return donatorName;
	}

	public void setDonatorName(String donatorName) {
		this.donatorName = donatorName;
	}

	public String getFundUsage() {
		return fundUsage;
	}

	public void setFundUsage(String fundUsage) {
		this.fundUsage = fundUsage;
	}

	public String getDonationNumFile() {
		return donationNumFile;
	}

	public void setDonationNumFile(String donationNumFile) {
		this.donationNumFile = donationNumFile;
	}

}
